package com.yh.hljapp.gddb.gdbean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.ToOne;
import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.annotation.NotNull;

/**
 * =========================
 * 版权所有，违法必究
 * 作者：john
 * <p>
 * 工程：FoodBarcode
 * <p>
 * 文件名：MatBeanCount
 * <p>
 * 创建时间：2017.05.24.13:52
 * *****************************
 */
@Entity
public class MatBeanCount {
    @Id(autoincrement = true)
    private Long ids;

    private String id;

    private String model;
    private String name;
    private String number;
    private String unit_name;
    private String unit_id;
    private String unitgroup_name;
    private String unitgroup_id;
    private String count;
    private String FDCStockName;
    private String FDCStockID;
    private double saleprice;
    private String type;
    private String posotion;
    private String barcode;
    private String FNote;
    private double Qty;



    private String credit;//赠品基础积分
    public String FUnitScore ;//商品单位积分
    public String FItemScore ;//商品积分
    public String FUnitTradeScore ;//赠品单位积分
    public String FTradeScore ;//赠品积分
    public String userName ;//用户名称


    private String TDCStockName;
    private String TDCStockID;
    private double allMoney;

    public long headId;
    @ToOne(joinProperty = "headId")
    private MatHead head;

    /** Used to resolve relations */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;

    /** Used for active entity operations. */
    @Generated(hash = 14537031)
    private transient MatBeanCountDao myDao;

    @Generated(hash = 80859862)
    private transient Long head__resolvedKey;




    @Generated(hash = 1456191415)
    public MatBeanCount(Long ids, String id, String model, String name, String number, String unit_name,
            String unit_id, String unitgroup_name, String unitgroup_id, String count,
            String FDCStockName, String FDCStockID, double saleprice, String type, String posotion,
            String barcode, String FNote, double Qty, String credit, String FUnitScore,
            String FItemScore, String FUnitTradeScore, String FTradeScore, String userName,
            String TDCStockName, String TDCStockID, double allMoney, long headId) {
        this.ids = ids;
        this.id = id;
        this.model = model;
        this.name = name;
        this.number = number;
        this.unit_name = unit_name;
        this.unit_id = unit_id;
        this.unitgroup_name = unitgroup_name;
        this.unitgroup_id = unitgroup_id;
        this.count = count;
        this.FDCStockName = FDCStockName;
        this.FDCStockID = FDCStockID;
        this.saleprice = saleprice;
        this.type = type;
        this.posotion = posotion;
        this.barcode = barcode;
        this.FNote = FNote;
        this.Qty = Qty;
        this.credit = credit;
        this.FUnitScore = FUnitScore;
        this.FItemScore = FItemScore;
        this.FUnitTradeScore = FUnitTradeScore;
        this.FTradeScore = FTradeScore;
        this.userName = userName;
        this.TDCStockName = TDCStockName;
        this.TDCStockID = TDCStockID;
        this.allMoney = allMoney;
        this.headId = headId;
    }
    @Generated(hash = 1655124455)
    public MatBeanCount() {
    }

    


    public String getId() {
        return this.id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getModel() {
        return this.model;
    }
    public void setModel(String model) {
        this.model = model;
    }
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getNumber() {
        return this.number;
    }
    public void setNumber(String number) {
        this.number = number;
    }
    public String getUnit_name() {
        return this.unit_name;
    }
    public void setUnit_name(String unit_name) {
        this.unit_name = unit_name;
    }
    public String getUnit_id() {
        return this.unit_id;
    }
    public void setUnit_id(String unit_id) {
        this.unit_id = unit_id;
    }
    public String getUnitgroup_name() {
        return this.unitgroup_name;
    }
    public void setUnitgroup_name(String unitgroup_name) {
        this.unitgroup_name = unitgroup_name;
    }
    public String getUnitgroup_id() {
        return this.unitgroup_id;
    }
    public void setUnitgroup_id(String unitgroup_id) {
        this.unitgroup_id = unitgroup_id;
    }
    public String getCount() {
        return this.count;
    }
    public void setCount(String count) {
        this.count = count;
    }
    public double getSaleprice() {
        return this.saleprice;
    }
    public void setSaleprice(double saleprice) {
        this.saleprice = saleprice;
    }
    public String getFDCStockName() {
        return this.FDCStockName;
    }
    public void setFDCStockName(String FDCStockName) {
        this.FDCStockName = FDCStockName;
    }
    public String getFDCStockID() {
        return this.FDCStockID;
    }
    public void setFDCStockID(String FDCStockID) {
        this.FDCStockID = FDCStockID;
    }
    public String getType() {
        return this.type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public Long getIds() {
        return this.ids;
    }
    public void setIds(Long ids) {
        this.ids = ids;
    }
    public String getPosotion() {
        return this.posotion;
    }
    public void setPosotion(String posotion) {
        this.posotion = posotion;
    }
    public String getCredit() {
        return this.credit;
    }
    public void setCredit(String credit) {
        this.credit = credit;
    }
    public String getBarcode() {
        return this.barcode;
    }
    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }
    public String getFUnitScore() {
        return this.FUnitScore;
    }
    public void setFUnitScore(String FUnitScore) {
        this.FUnitScore = FUnitScore;
    }
    public String getFItemScore() {
        return this.FItemScore;
    }
    public void setFItemScore(String FItemScore) {
        this.FItemScore = FItemScore;
    }
    public String getFUnitTradeScore() {
        return this.FUnitTradeScore;
    }
    public void setFUnitTradeScore(String FUnitTradeScore) {
        this.FUnitTradeScore = FUnitTradeScore;
    }
    public String getFTradeScore() {
        return this.FTradeScore;
    }
    public void setFTradeScore(String FTradeScore) {
        this.FTradeScore = FTradeScore;
    }
    public String getUserName() {
        return this.userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public long getHeadId() {
        return this.headId;
    }
    public void setHeadId(long headId) {
        this.headId = headId;
    }
    /** To-one relationship, resolved on first access. */
    @Generated(hash = 353320111)
    public MatHead getHead() {
        long __key = this.headId;
        if (head__resolvedKey == null || !head__resolvedKey.equals(__key)) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            MatHeadDao targetDao = daoSession.getMatHeadDao();
            MatHead headNew = targetDao.load(__key);
            synchronized (this) {
                head = headNew;
                head__resolvedKey = __key;
            }
        }
        return head;
    }
    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 906896995)
    public void setHead(@NotNull MatHead head) {
        if (head == null) {
            throw new DaoException(
                    "To-one property 'headId' has not-null constraint; cannot set to-one to null");
        }
        synchronized (this) {
            this.head = head;
            headId = head.getId();
            head__resolvedKey = headId;
        }
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }
    public String getTDCStockName() {
        return this.TDCStockName;
    }
    public void setTDCStockName(String TDCStockName) {
        this.TDCStockName = TDCStockName;
    }
    public String getTDCStockID() {
        return this.TDCStockID;
    }
    public void setTDCStockID(String TDCStockID) {
        this.TDCStockID = TDCStockID;
    }
    public String getFNote() {
        return this.FNote;
    }
    public void setFNote(String FNote) {
        this.FNote = FNote;
    }
    public double getAllMoney() {
        return this.allMoney;
    }
    public void setAllMoney(double allMoney) {
        this.allMoney = allMoney;
    }
    public double getQty() {
        return this.Qty;
    }
    public void setQty(double Qty) {
        this.Qty = Qty;
    }
    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 1353792167)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getMatBeanCountDao() : null;
    }



   
}
